{% extends "pretixcontrol/event/settings_base.html" %}
{% load i18n %}
{% load bootstrap3 %}
{% block inside %}
    <nav id="event-nav" class="header-nav">
        <div class="navigation">
            <div class="navigation-title">
                <h1>{% trans "Invoice settings" %}</h1>
            </div>
            {% include "pretixcontrol/event/component_link.html" %}
        </div>
    </nav>
    <form action="" method="post" class="form-horizontal" enctype="multipart/form-data">
        <div class="tabbed-form">
            {% csrf_token %}
            {% bootstrap_form_errors form %}
            <fieldset>
                <legend>{% trans "Invoice generation" %}</legend>
                {% bootstrap_field form.invoice_generate layout="control" %}
                {% bootstrap_field form.invoice_generate_sales_channels layout="control" %}
                {% bootstrap_field form.invoice_email_attachment layout="control" %}
                {% bootstrap_field form.invoice_language layout="control" %}
                {% bootstrap_field form.invoice_include_free layout="control" %}
                {% bootstrap_field form.invoice_show_payments layout="control" %}
                {% bootstrap_field form.invoice_reissue_after_modify layout="control" %}
                {% bootstrap_field form.invoice_numbers_consecutive layout="control" %}
                {% bootstrap_field form.invoice_numbers_prefix layout="control" %}
                {% bootstrap_field form.invoice_numbers_prefix_cancellations layout="control" %}
                {% bootstrap_field form.invoice_numbers_counter_length layout="control" %}
            </fieldset>
            <fieldset>
                <legend>{% trans "Address form" %}</legend>
                {% bootstrap_field form.invoice_address_asked layout="control" %}
                {% bootstrap_field form.invoice_address_required layout="control" %}
                {% bootstrap_field form.invoice_name_required layout="control" %}
                {% bootstrap_field form.invoice_address_company_required layout="control" %}
                {% bootstrap_field form.invoice_address_vatid layout="control" %}
                {% bootstrap_field form.invoice_address_beneficiary layout="control" %}
                {% bootstrap_field form.invoice_address_not_asked_free layout="control" %}
                {% bootstrap_field form.invoice_address_custom_field layout="control" %}
                {% bootstrap_field form.invoice_address_explanation_text layout="control" %}
            </fieldset>
            <fieldset>
                <legend>{% trans "Issuer details" %}</legend>
                {% bootstrap_field form.invoice_address_from_name layout="control" %}
                {% bootstrap_field form.invoice_address_from layout="control" %}
                {% bootstrap_field form.invoice_address_from_zipcode layout="control" %}
                {% bootstrap_field form.invoice_address_from_city layout="control" %}
                {% bootstrap_field form.invoice_address_from_country layout="control" %}
                {% bootstrap_field form.invoice_address_from_tax_id layout="control" %}
                {% bootstrap_field form.invoice_address_from_vat_id layout="control" %}
            </fieldset>
            <fieldset>
                <legend>{% trans "Invoice customization" %}</legend>
                {% bootstrap_field form.invoice_renderer layout="control" %}
                {% bootstrap_field form.invoice_attendee_name layout="control" %}
                {% bootstrap_field form.invoice_include_expire_date layout="control" %}
                {% bootstrap_field form.invoice_introductory_text layout="control" %}
                {% bootstrap_field form.invoice_additional_text layout="control" %}
                {% bootstrap_field form.invoice_footer_text layout="control" %}
                {% bootstrap_field form.invoice_logo_image layout="control" %}
                {% bootstrap_field form.invoice_eu_currencies layout="control" %}
            </fieldset>
        </div>
        <div class="form-group submit-group">
            <button type="submit" class="btn btn-default btn-lg" name="preview" value="preview" formtarget="_blank">
                {% trans "Save and show preview" %}
            </button>
            <button type="submit" class="btn btn-primary btn-save">
                {% trans "Save" %}
            </button>
        </div>
    </form>
{% endblock %}
